package com.gopay.common.domain.bank.route.po.pay;

import com.gopay.common.domain.BaseEntity;

import javax.persistence.*;
import java.util.Date;

/**
 * 付款路由-商户方案
 * @author xj.x@hnair.com
 * @date 2018-04-16 16:11
 **/
@Entity
@Table(name = "pay_spec_route_solution")
public class PaySpecRouteSolution extends BaseEntity {

    /**
     * 主键
     */
    private Integer solutionId;
    /**
     * 方案名称
     */
    private String solutionName;
    /**
     * 是否生效 （0-未生效；1-已生效）
     */
    private String isValid;
    /**
     * 是否删除 （1-已删除；2-未生效）
     */
    private String delFlag;
    /**
     * 创建时间
     */
    private Date createdTs;
    /**
     * 最后更新时间
     */
    private Date updatedTs;
    /**
     * 乐观锁版本号
     */
    private Integer version;

    @Id
    @SequenceGenerator(name = "paySpecRouteSoluSeq", sequenceName = "PAY_SPEC_ROUTE_SOLU_SEQ" ,allocationSize=1)
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "paySpecRouteSoluSeq")
    @Column(name = "SOLUTION_ID", unique = true, nullable = false)
    public Integer getSolutionId() {
        return solutionId;
    }

    public void setSolutionId(Integer solutionId) {
        this.solutionId = solutionId;
    }

    @Column(name = "SOLUTION_NAME")
    public String getSolutionName() {
        return solutionName;
    }

    public void setSolutionName(String solutionName) {
        this.solutionName = solutionName;
    }

    @Column(name = "IS_VALID")
    public String getIsValid() {
        return isValid;
    }

    public void setIsValid(String isValid) {
        this.isValid = isValid;
    }

    @Column(name = "DEL_FLAG")
    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    @Column(name = "CREATED_TS", nullable = false)
    @Temporal(TemporalType.TIMESTAMP)
    public Date getCreatedTs() {
        return createdTs;
    }

    public void setCreatedTs(Date createdTs) {
        this.createdTs = createdTs;
    }

    @Column(name = "UPDATED_TS", nullable = false)
    @Temporal(TemporalType.TIMESTAMP)
    public Date getUpdatedTs() {
        return updatedTs;
    }

    public void setUpdatedTs(Date updatedTs) {
        this.updatedTs = updatedTs;
    }

    @Version
    @Column(name = "VERSION")
    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }
}
